package com.dyp.zalandodemo.web.rest;

import com.dyp.zalandodemo.web.rest.config.BadRequestAlertException;
import com.dyp.zalandodemo.web.rest.model.vo.PersonResponse;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.net.URISyntaxException;

@RestController
public class PersonRsource {
    @GetMapping("/person")
    public ResponseEntity<PersonResponse> getPerson() throws URISyntaxException {

        throw new BadRequestAlertException("A new company cannot already have an ID", "person", "idexists");
    }
}
